package com.css.fxfzysx.util.hypergraph.controller;

import com.css.fxfzysx.base.response.RestResponse;
import com.css.fxfzysx.util.hypergraph.service.HypergraphService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Description: fxfzfxqh
 * @Author: lhl
 * @CreateDate: 2023/6/5 14:26
 * 超图
 */
@RestController
@RequestMapping("/hypergraph")
public class HypergraphController {

    @Resource
    HypergraphService hypergraphService;


    /**
     * 获取超图server口令
     * @return
     */
    @PostMapping("/getServerToken")
    public RestResponse getServerToken(@RequestBody Map<String, Object> map){
        RestResponse restResponse=null;
        try {
            restResponse=hypergraphService.getServerToken(map);
        } catch (Exception e) {
            e.printStackTrace();
            restResponse= RestResponse.fail("获取失败！");
        }
        return restResponse;
    }
}
